Optimal. Leaf size=25 \[ -\frac {i a^3}{d (a-i a \tan (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3568, 32}
\begin {gather*} -\frac {i a^3}{d (a-i a \tan (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 32
Rule 3568
Rubi steps
\begin {align*} \int \cos ^2(c+d x) (a+i a \tan (c+d x))^2 \, dx &=-\frac {\left (i a^3\right ) \text {Subst}\left (\int \frac {1}{(a-x)^2} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {i a^3}{d (a-i a \tan (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 31, normalized size = 1.24 \begin {gather*} -\frac {i a^2 (\cos (c+d x)+i \sin (c+d x))^2}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 72 vs. \(2 (23 ) = 46\).
time = 0.24, size = 73, normalized size = 2.92
method | result | size |
risch | \(-\frac {i a^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{2 d}\) | \(19\) |
derivativedivides | \(\frac {-a^{2} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )-i a^{2} \left (\cos ^{2}\left (d x +c \right )\right )+a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(73\) |
default | \(\frac {-a^{2} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )-i a^{2} \left (\cos ^{2}\left (d x +c \right )\right )+a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(73\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 32, normalized size = 1.28 \begin {gather*} \frac {a^{2} \tan \left (d x + c\right ) - i \, a^{2}}{{\left (\tan \left (d x + c\right )^{2} + 1\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 17, normalized size = 0.68 \begin {gather*} -\frac {i \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.10, size = 36, normalized size = 1.44 \begin {gather*} \begin {cases} - \frac {i a^{2} e^{2 i c} e^{2 i d x}}{2 d} & \text {for}\: d \neq 0 \\a^{2} x e^{2 i c} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.56, size = 17, normalized size = 0.68 \begin {gather*} -\frac {i \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.28, size = 18, normalized size = 0.72 \begin {gather*} \frac {a^2}{d\,\left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________